<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css3动画特效</title>
  <style>
    body{
        background-color: black;
    }
    img{
        width: 200px;
        height: 200px;
        margin: 400px auto;
        border-radius: 10px;
        display: block;
    }
    .Effect-effectBounce:hover {
        animation: bounce 1s infinite;
        -webkit-animation: bounce 1s infinite;
    }
    @keyframes bounce {
        0%, 20%, 50%, 80%,
        100% {
            -webkit-transform: translateY(0);
            -ms-transform: translateY(0);
            transform: translateY(0)
        }
        40% {
            -webkit-transform: translateY(-30px);
            -ms-transform: translateY(-30px);
            transform: translateY(-30px)
        }
        60% {
            -webkit-transform: translateY(-15px);
            -ms-transform: translateY(-15px);
            transform: translateY(-15px)
        }
    }
  </style>
</head>
<body>
    <img class="Effect-effectBounce" src="./images/tx.jpg" />
</body>
</html>